<template>
  <view class="drawer-tab-item">
    <uni-icons :type="iconType" :size="iconSize" :color="iconColor"></uni-icons>
    <text class="drawer-tab-text">{{ textContent }}</text>
  </view>
</template>

<script setup lang="ts">
import { defineProps } from 'vue';

export interface DrawerTabProps {
  /** 图标类型，使用uni-icons支持的类型 */
  iconType: string;
  /** 文本内容 */
  textContent: string;
  /** 图标大小，默认24 */
  iconSize?: string;
  /** 图标颜色，默认#333333 */
  iconColor?: string;
}

defineProps({
  iconType: {
    type: String,
    required: true
  },
  textContent: {
    type: String,
    required: true
  },
  iconSize: {
    type: Number,
    default: 24
  },
  iconColor: {
    type: String,
    default: '#333333'
  }
});
</script>

<style lang="scss">
.drawer-tab-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  padding: 16rpx;
  margin-top: 20rpx;
  cursor: pointer;

  .drawer-tab-text {
    margin-left: 30rpx;
    font-size: 30rpx;
    color: #333333;
  }
}
</style>